package org.topteam.service.demo.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.topteam.dao.demo.TodoDao;
import org.topteam.domain.demo.Todo;
import org.topteam.service.demo.ITodoService;


@Service
public class TodoServiceImpl implements ITodoService{
	
	@Autowired private TodoDao todoDao;

	@Override
	public List<Todo> getTodos(int page, int size) throws Exception {
		return todoDao.getTodos(page,size);
	}

	@Override
	public long getTodoCount() throws Exception {
		return todoDao.getTodoCount();
	}

	@Override
	public void saveTodo(Todo todo) throws Exception {
		todoDao.save(todo);
	}

}
